package cn.huaqingcheng.tianshu.common.core.model;

import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.Unmodifiable;

import java.time.Instant;
import java.util.Map;

/**
 * 临时 url
 *
 * @param method     请求方法
 * @param url        请求 url
 * @param headers    请求头
 * @param expiration 过期时间
 */
public record TemporaryUrl(
        String method,
        String url,
        @Unmodifiable Map<String, String> headers,
        @Nullable Instant expiration
) {

    public TemporaryUrl(String method, String url, @Unmodifiable Map<String, String> headers) {
        this(method, url, headers, null);
    }

}
